import sys
from SmallCV import ColorType, ConvertType, Scalar, Mat, cv

cv = cv()
filePath = sys.argv[1]
fileRoute = filePath.split('.')
splitPart = fileRoute[len(fileRoute)-2].split('/')
fileName = splitPart[len(splitPart)-1].split('\\')
print 'File name: ' + fileName[len(fileName)-1]
sourceImage = cv.imread(filePath)
destinyImage = Mat(sourceImage.cols, sourceImage.rows)
cv.cvtColor(sourceImage, destinyImage, ConvertType.BGR2YIQ)
cv.imwrite(fileName[len(fileName)-1] + '-1160300719-YIQ.bmp', destinyImage)
cv.cvtColor(sourceImage, destinyImage, ConvertType.BGR2HSI)
cv.imwrite(fileName[len(fileName)-1] + '-1160300719-HSI.bmp', destinyImage)
cv.cvtColor(sourceImage, destinyImage, ConvertType.BGR2YCbCr)
cv.imwrite(fileName[len(fileName)-1] + '-1160300719-YCbCr.bmp', destinyImage)
cv.cvtColor(sourceImage, destinyImage, ConvertType.BGR2XYZ)
cv.imwrite(fileName[len(fileName)-1] + '-1160300719-XYZ.bmp', destinyImage)